package com.app.service.impl;

import com.app.dao.UserMapper;
import com.app.entity.BackendUser;
import com.app.service.LoginService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class LoginServiceImpl implements LoginService {
    @Autowired
    private UserMapper userMapper;
    @Override
    public BackendUser login(String userCode, String password) {
        BackendUser login = userMapper.login(userCode);
        if(login!=null&&login.getUserPassword().equals(password)){
            return login;
        }
        return null;
    }
}
